package com.zxc.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class StringToDate {
    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    public static Date stringToDate(String stringDate){
        Date date = new Date();
        try {
            date = sdf.parse(stringDate);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return date;
    }
}
